www.gusucode.com > VC++ 车牌定位与识别源码程序 > VC++ 车牌定位与识别源码程序/code/PlateReco/DlgRecoResult.cpp

    //Download by http://www.NewXing.com
// DlgRecoResult.cpp : implementation file
//

#include "stdafx.h"
#include "PlateReco.h"
#include "DlgRecoResult.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CDlgRecoResult dialog


CDlgRecoResult::CDlgRecoResult(CWnd* pParent /*=NULL*/)
	: CDialog(CDlgRecoResult::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDlgRecoResult)
	//}}AFX_DATA_INIT
}


void CDlgRecoResult::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDlgRecoResult)
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDlgRecoResult, CDialog)
	//{{AFX_MSG_MAP(CDlgRecoResult)
	ON_WM_PAINT()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDlgRecoResult message handlers
void CDlgRecoResult::OnPaint() 
{
	CPaintDC dc(this); // device context for painting
	
	// TODO: Add your message handler code here

	// 将背景模式设为透明
	dc.SetBkMode(TRANSPARENT);

	// 设置文本的颜色
	dc.SetTextColor(RGB(0,0,250));

	CFont myFont;

	myFont.CreateFont(50,0,0,0,400,FALSE,FALSE,0,
		              ANSI_CHARSET,OUT_DEFAULT_PRECIS,
					  CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,
					  DEFAULT_PITCH|FF_SWISS,"Arial");

	CFont* pOldFont = dc.SelectObject(&myFont);

	// 在指定的位置上显示文本


	dc.TextOut(40,62,(CString)m_cRecoChar[0]);
	dc.TextOut(65,62,(CString)m_cRecoChar[1]);
	dc.TextOut(90,62,(CString)m_cRecoChar[2]);
	dc.TextOut(115,62,(CString)m_cRecoChar[3]);
	dc.TextOut(140,62,(CString)m_cRecoChar[4]);
	dc.TextOut(165,62,(CString)m_cRecoChar[5]);

	//  
	dc.SelectObject(pOldFont);
	CDialog::OnPaint();
	
	// Do not call CDialog::OnPaint() for painting messages
}